const Musics = require('../db/musics');

module.exports = {
    // 存储
    async save(req, res, next) {
        let data = req.body;
        res.send((await (new Musics(req.body)).save()));
    },

    // 获取list
    async list(req, res, next) {
        res.send((await Musics.find().select('_id mTitle mAuthor mUrl mBgUrl createdAt updatedAt').exec()));
    }
}